using System.Collections.Generic;

namespace NGIS.Model
{
	public struct SpatialScope
	{
		public List<SpatialExtent> Extents;

		public List<string> AreaNames;

		public static bool operator ==(SpatialScope ssA, SpatialScope ssB)
		{
			if (ssA.Extents.Count != ssB.Extents.Count)
			{
				return false;
			}
			for (int i = 0; i < ssA.Extents.Count; i++)
			{
				if (!ssB.Extents.Contains(ssA.Extents[i]))
				{
					return false;
				}
			}
			if (ssA.AreaNames.Count != ssB.AreaNames.Count)
			{
				return false;
			}
			for (int j = 0; j < ssA.AreaNames.Count; j++)
			{
				if (!ssB.AreaNames.Contains(ssA.AreaNames[j]))
				{
					return false;
				}
			}
			return true;
		}

		public static bool operator !=(SpatialScope ssA, SpatialScope ssB)
		{
			return !(ssA == ssB);
		}
	}
}
